#!/usr/bin/env python
# -*- coding:utf-8 -*-

# file:homework2_10.py
# author:wmf
# datetime:2021/4/5 0:19
# software: PyCharm
'''
this is function description
'''
# import module your need

#10 编写一个函数cacluate, 可以实现2个数的运算(加,减 乘,除)

def cacluate(a,b,c): #a,b为运算的数字,c为操作
    if(c == '+'):
        d = a + b
    elif(c == '-'):
        d = a - b
    elif(c == '*'):
        d = a * b
    elif(c == '/'):
        d = a / b
    else:
        print("输入的参数不符合格式")
    return d

print(cacluate(1, 2, '/'))
